<?php session_start();?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>修改密码</title>
    <link rel="stylesheet" href="/styles.css">
    <style>
        /* 页面容器使用flex布局，设置上方留白更多 */
        .container {
            display: flex;
            flex-direction: column;
            justify-content: flex-start;  /* 改为靠上对齐 */
            align-items: center;
            min-height: 100vh;  /* 设置为100vh占满整个视口高度 */
            padding-top: 15vh;  /* 从顶部添加固定间距，大约15%视口高度 */
            padding-bottom: 60px;  /* 为页脚留出空间 */
        }
        
        /* 整个卡片内容居中 */
        .card {
            text-align: center;
            max-width: 600px;
            width: 100%;
            margin: 0 auto;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        }
        
        /* 表单内的输入框左对齐但整体居中 */
        form {
            display: block;
            width: 80%;
            margin: 0 auto;
            text-align: left;
        }
        
        /* 按钮容器居中 */
        .button-container {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin-top: 25px;
            margin-bottom: 10px;
        }
        
        /* 按钮样式 */
        .form-btn {
            background: linear-gradient(to right, #4b6cb7, #182848);
            color: white;
            border: none;
            padding: 8px 20px;
            border-radius: 4px;
            cursor: pointer;
            font-weight: bold;
            min-width: 80px;
        }
        
        /* 重置按钮样式 */
        .form-btn.reset {
            background: #6c757d;
        }
        
        /* 返回按钮居中 */
        .return-link {
            text-align: center;
            margin-top: 20px;
        }
        
        /* 页脚固定在底部 */
        footer {
            position: fixed;
            bottom: 0;
            width: 100%;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="card">
            <h1>修改密码</h1>
            <form action="modifypwd1.php" method="post">
                <label for="oldpwd">原密码：</label>
                <input type="password" name="oldpwd" id="oldpwd" required>
                
                <label for="pass1">新密码：</label>
                <input type="password" name="pass1" id="pass1" required>
                
                <label for="pass2">确认密码：</label>
                <input type="password" name="pass2" id="pass2" required>
                
                <div class="button-container">
                    <input type="submit" value="提交" class="form-btn">
                    <input type="reset" value="重置" class="form-btn reset">
                </div>
            </form>
            <div class="return-link">
                <a href="../PHP_index/index.php" class="action-link">返回</a>
            </div>
        </div>
    </div>
    <?php include '../footer.php'; ?>
</body>
</html>